Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR simplifies how request configuration is accessed by consolidating multiple specialized accessor methods into a single generic config_mut method and updating builder calls to use it.
- Removed individual
*_mutaccessors inRequestand added a genericconfig_mut<T>() - Refactored all
RequestBuildermethods to callconfig_mut::<...>()instead of dedicated accessors - Cleaned up import statements, removing now-unneeded specific imports
Comments suppressed due to low confidence (5)
src/client/request.rs:18
- The
AcceptEncodingtype returned byconfig_mut::<RequestAcceptEncoding>()is used in the builder methods but no longer imported. Adduse super::layer::decoder::AcceptEncoding;so it resolves correctly.
use super::layer::config::RequestAcceptEncoding;
src/client/request.rs:292
RequestSkipDefaultHeadersis referenced here but not imported fromcore::ext. Add it to theuse super::core::ext::{ ... }list so this call compiles.
*req.config_mut::<RequestSkipDefaultHeaders>() = Some(skip);
src/client/request.rs:367
RequestTotalTimeoutis missing from thecore::extimports. Include it so thatconfig_mut::<RequestTotalTimeout>()can be resolved.
*req.config_mut::<RequestTotalTimeout>() = Some(timeout);
src/client/request.rs:379
RequestReadTimeoutisn’t imported in thecore::extblock. Add this import so theconfig_mutcall compiles.
*req.config_mut::<RequestReadTimeout>() = Some(timeout);
src/client/request.rs:472
RequestRedirectPolicyis used here but not imported fromcore::ext. Add it to the import list to fix the unresolved reference.
*req.config_mut::<RequestRedirectPolicy>() = Some(policy);
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.